﻿using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Formatters;
using System.Runtime.Serialization;

namespace AspDotNet.Core6.WebApi.Models
{


    [Serializable]
    [DataContract]
    public class Person
    {
        /// <summary>
        /// 姓名
        /// </summary>
        [DataMember]
        public string name { get; set; }
        /// <summary>
        /// 年龄
        /// </summary>
        [DataMember]
        public string age { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        [DataMember]
        public string address { get; set; }
        [DataMember]
        public Pet pet { get; set; } = new Pet();
    }

    public class Pet
    {
        public string name { get; set; }
    }

}
